package com.zhiy.com.estation.ui.fragment.upload;

import com.zhiy.com.estation.api.Api;
import com.zhiy.com.estation.api.ApiResult;

import io.reactivex.Flowable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import okhttp3.RequestBody;

/**
 * Created by Zyh on 2016/12/6.
 */
public class UploadModel implements UploadAvarContract.Model {
    @Override
    public Flowable<ApiResult<String>> upload(String userid,  RequestBody requestBody) {
        return Api.getInstance().mService.upload(userid,requestBody)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());

    }
}
